<?php

namespace AppBundle\Common;

use Monolog\Logger;

/**
 * Created by PhpStorm.
 * User: CCJK
 * Date: 2018/4/17
 * Time: 15:49
 */
class Log
{
    static $DEBUG = false;
    private $log;

    public function __construct($name = "app")
    {
        $this->log = new Logger($name);
    }

    public function info($msg)
    {
        $this->log->log(Logger::INFO, $msg,array("aaaaa"));
    }

    public function error($msg)
    {
        $this->log->log(Logger::ERROR, $msg);
    }

    public function debug($msg)
    {
        $this->log->log(Logger::DEBUG, $msg);
    }

    public function warning($msg)
    {
        $this->log->log(Logger::WARNING, $msg);
    }

    public function notice($msg)
    {
        $this->log->log(Logger::NOTICE, $msg);
    }

    public static function log($message)
    {


        error_log(PHP_EOL.$message.PHP_EOL, 3, "php://stdout");
    }


}